package com.fhz.a2102high6

import kotlin.reflect.KProperty

/**
 * 时间:2023/9/11
 * @author Mr.Feng
 * 简述: sp
 */
class Delegate {
    operator fun getValue(c: Example, property: KProperty<*>): String {
        return "$c, thank you for delegating '${property.name}' to me!"
    }

    operator fun setValue(example: Example, property: KProperty<*>, s: String) {
        println("$s has been assigned to '${property.name}' in $example.")
    }

}